<template>
  <div class="sectionTitle">
    <div class="title">
      <h3>{{ sectionName }}</h3>
    </div>
    <div class="more" v-if="showMore">
      <span>更多</span><i class="iconfont icon-jiantou"></i>
    </div>
  </div>
</template>

<script>
export default {
  name: "SectionTitle",
  data() {
    return {};
  },
  props: {
    sectionName: {
      type: String,
      default: "",
      required: true, // 必须传值
    },
    showMore: {
      type: Boolean,
      default: true,
    },
  },
};
</script>

<style lang="scss" scoped>
.sectionTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  height: 2rem;
  margin: 1.5rem auto 1rem;
  .title h3 {
    font-size: 1.25rem;
    color: #1a1a1a;
  }
  .more {
    font-size: 1rem;
    cursor: pointer;
    i {
      font-weight: 700;
    }
  }
}
</style>
